﻿package view.task
{
    import __AS3__.vec.*;
    import com.core.*;
    import com.core.destroy.*;
    import com.greensock.*;
    import com.sh.game.consts.*;
    import com.sh.game.global.*;
    import com.sh.game.net.*;
    import consts.*;
    import control.*;
    import flash.events.*;
    import flash.geom.*;
    import flash.utils.*;
    import manager.*;
    import morn.core.components.*;
    import plugin.taskdialog.consts.*;
    import view.*;
    import view.uilt.*;

    public class TaskViewUI extends View
    {
        public var _bg_Sprite:Box;
        public var _panel_Task:Box;
        public var img_back:Image;
        public var _task_Panel:Panel;
        public var _title_Task:Image;
        public var img_Task:Image;
        public var box_view:Box;
        public var lab_zb:Label;
        public var lab_sj:Label;
        public var box_txt:Box;
        public var hcLabel:Label;
        public var bossLabel:Label;
        public var xunbaoLabel:Label;
        public var huishouLabel:Label;
        public var guajiLabel:Label;
        public var shouqiBtn:Button;
        protected var uiXML:XML;
        private var tlist:Array;
        private var _data:Object;
        private var taskP:Point;
        private var mTasks:Object;
        private var cfgnpcs:Object;
        private var mitems:Object;
        private var cfgTaskNum:Object;
        private var cfgtaskguide:Object;
        private var cfgtaskview:Object;
        private var cfgmaps:Object;
        private var _listSprites:MyVBox;
        private var _listSprite:MyVBox;
        private var _listSprite1:MyVBox;
        private var _listSprite2:MyVBox;
        private var _daySprite:Component;
        private var _txtDay1:MyLabel;
        private var _txtDay2:MyLabel;
        private var _txtDay3:MyLabel;
        private var _txtDay4:MyLabel;
        private var _txtDay5:MyLabel;
        private var _txtActive:MyLabel;
        private var itemArr:Vector.<TaskTrackItem>;
        private var _lv:int;
        private var activetitem:ActiveTrackItems;
        protected var sytItem:SYTFBItem;
        protected var tdItem:TDItem;
        protected var emsItem:EMSItem;
        protected var mfItem:MFItem;
        protected var muItem:Mulinstance;
        private var isAdd:Boolean = false;
        private var taskSprite:Component;
        private var _filterIntvalid:uint = 0;
        private var showType:int = 0;
        private var nowactive:int = 0;
        private var timeoutID1:uint;
        private var cname:String;
        private var eff:Clip;
        private var _showmc:int;
        private var _effLoading:Boolean = false;
        private var _isFirst:Boolean = true;
        private var _cfgIns:Object;
        private var _npcArr:Array;
        private var timeline3:TweenMax;
        private var taskArr:Array;
        private var taskFlag:Boolean = true;
        private var isFirstFlag:Boolean = true;
        private var taskNpc:int = 0;

        public function TaskViewUI()
        {
            this.uiXML = <View>
n	t	t	t  <Box x=""-68"" y=""-10"" var=""_bg_Sprite"">
n	t	t	t	t<Box x=""11"" y=""31"" var=""_panel_Task"" width=""266"" height=""265"">
n	t	t	t	t  <Image url=""png.common.taskview"" sizeGrid=""4,4,4,4"" width=""266"" height=""378"" x=""0"" y=""0"" var=""img_back""/>
n	t	t	t	t</Box>
n	t	t	t	t<Panel width=""266"" height=""162"" x=""11"" y=""32"" var=""_task_Panel""/>
n	t	t	t	t<Image url=""png.common.kuang"" y=""8"" var=""_title_Task"" x=""0"" mouseChildren=""false"" mouseEnabled=""false""/>
n	t	t	t	t<Image url=""png.common.task"" x=""17"" var=""img_Task"" mouseChildren=""false"" mouseEnabled=""false""/>
n	t	t	t	t<Box x=""18"" y=""353"" var=""box_view"">
n	t	t	t	t  <Image url=""png.common.task_x"" x=""9""/>
n	t	t	t	t  <Label text=""[我要装备]"" width=""66"" height=""18"" stroke=""1"" font=""SimSun"" color=""0xe19f21"" y=""14"" var=""lab_zb"" x=""0""/>
n	t	t	t	t  <Label text=""[我要升级]"" y=""36"" width=""66"" height=""18"" stroke=""1"" font=""SimSun"" color=""0xe19f21"" var=""lab_sj"" x=""0""/>
n	t	t	t	t  <Box x=""68"" y=""14"" var=""box_txt"">
n	t	t	t	t	t<Label text=""合成"" width=""30"" height=""18"" stroke=""1"" font=""SimSun"" underline=""true"" leading=""3"" color=""0x53b436"" var=""hcLabel"" x=""0"" y=""0""/>
n	t	t	t	t	t<Label text=""BOSS"" x=""33"" width=""31"" height=""18"" stroke=""1"" font=""SimSun"" underline=""true"" leading=""3"" color=""0x53b436"" var=""bossLabel""/>
n	t	t	t	t	t<Label text=""寻宝"" x=""68"" width=""31"" height=""18"" stroke=""1"" font=""SimSun"" underline=""true"" leading=""3"" color=""0x53b436"" var=""xunbaoLabel""/>
n	t	t	t	t	t<Label text=""回收"" y=""22"" width=""30"" height=""18"" stroke=""1"" font=""SimSun"" underline=""false"" leading=""3"" color=""0x53b436"" var=""huishouLabel""/>
n	t	t	t	t	t<Label text=""挂机"" x=""34"" y=""22"" width=""30"" height=""18"" stroke=""1"" font=""SimSun"" underline=""false"" leading=""3"" color=""0x53b436"" var=""guajiLabel""/>
n	t	t	t	t  </Box>
n	t	t	t	t</Box>
n	t	t	t  </Box>
n	t	t	t  <Button label=""label"" skin=""png.common.btn_unshow"" x=""182"" y=""25"" rotation=""270"" var=""shouqiBtn""/>
n	t	t	t</View>")("<View>
			  <Box x="-68" y="-10" var="_bg_Sprite">
				<Box x="11" y="31" var="_panel_Task" width="266" height="265">
				  <Image url="png.common.taskview" sizeGrid="4,4,4,4" width="266" height="378" x="0" y="0" var="img_back"/>
				</Box>
				<Panel width="266" height="162" x="11" y="32" var="_task_Panel"/>
				<Image url="png.common.kuang" y="8" var="_title_Task" x="0" mouseChildren="false" mouseEnabled="false"/>
				<Image url="png.common.task" x="17" var="img_Task" mouseChildren="false" mouseEnabled="false"/>
				<Box x="18" y="353" var="box_view">
				  <Image url="png.common.task_x" x="9"/>
				  <Label text="[我要装备]" width="66" height="18" stroke="1" font="SimSun" color="0xe19f21" y="14" var="lab_zb" x="0"/>
				  <Label text="[我要升级]" y="36" width="66" height="18" stroke="1" font="SimSun" color="0xe19f21" var="lab_sj" x="0"/>
				  <Box x="68" y="14" var="box_txt">
					<Label text="合成" width="30" height="18" stroke="1" font="SimSun" underline="true" leading="3" color="0x53b436" var="hcLabel" x="0" y="0"/>
					<Label text="BOSS" x="33" width="31" height="18" stroke="1" font="SimSun" underline="true" leading="3" color="0x53b436" var="bossLabel"/>
					<Label text="寻宝" x="68" width="31" height="18" stroke="1" font="SimSun" underline="true" leading="3" color="0x53b436" var="xunbaoLabel"/>
					<Label text="回收" y="22" width="30" height="18" stroke="1" font="SimSun" underline="false" leading="3" color="0x53b436" var="huishouLabel"/>
					<Label text="挂机" x="34" y="22" width="30" height="18" stroke="1" font="SimSun" underline="false" leading="3" color="0x53b436" var="guajiLabel"/>
				  </Box>
				</Box>
			  </Box>
			  <Button label="label" skin="png.common.btn_unshow" x="182" y="25" rotation="270" var="shouqiBtn"/>
			</View>;
            this.mTasks = ConfigDictionary.data.task;
            this.cfgnpcs = ConfigDictionary.data.sysnpc;
            this.mitems = ConfigDictionary.data.item;
            this.cfgTaskNum = ConfigDictionary.data.tasknum;
            this.cfgtaskguide = ConfigDictionary.data.taskguide;
            this.cfgtaskview = ConfigDictionary.data.taskview;
            this.cfgmaps = ConfigDictionary.data.maplist;
            this.itemArr = new Vector.<TaskTrackItem>;
            this.activetitem = new ActiveTrackItems();
            this._npcArr = [0, 0, 0, 0];
            this.taskArr = [];
            return;
        }// end function

        override protected function createChildren() : void
        {
            viewClassMap["view.task.ActivityGongchengUI"] = ActivityGongChengCtrl;
            viewClassMap["view.task.TaskCopyUI"] = TaskCopyCtrl;
            createView(this.uiXML);
            var _loc_1:* = Control.create(TaskControl, this);
            ModelProxy.addObserver("tasktrack", _loc_1);
            this._listSprites = new MyVBox();
            this._listSprites.y = 5;
            this._listSprites.x = 6;
            this._task_Panel.addChild(this._listSprites);
            this.taskSprite = new Component();
            this.taskSprite.y = 0;
            var _loc_2:Boolean = true;
            this.taskSprite.mouseEnabled = true;
            this.taskSprite.mouseChildren = _loc_2;
            this._listSprites.addChild(this.taskSprite);
            this._listSprite = new MyVBox();
            this.taskSprite.addChild(this._listSprite);
            this._listSprite.space = 6;
            this._daySprite = new Component();
            var _loc_2:Boolean = true;
            this._daySprite.mouseEnabled = true;
            this._daySprite.mouseChildren = _loc_2;
            this._listSprites.addChild(this._daySprite);
            this._listSprite1 = new MyVBox();
            this._listSprite1.space = 6;
            this._listSprite1.width = 100;
            this._daySprite.addChild(this._listSprite1);
            this._listSprite2 = new MyVBox();
            this._listSprite2.space = 6;
            this._listSprite2.width = 100;
            this._listSprite2.x = 90;
            this._daySprite.addChild(this._listSprite2);
            this.activetitem.name = "active1";
            this.activetitem.y = 0;
            this.activetitem.x = -8;
            this._listSprite.addChildAt(this.activetitem, 0);
            TweenMax.allTo([this._panel_Task, this._title_Task], 0.3, {alpha:0});
            UIVisibleManager.instance.register("taskview", this._bg_Sprite, UIVisibleManager.VRight);
            if (this.box_view.parent)
            {
                this.box_view.parent.removeChild(this.box_view);
            }
            this.initEvent();
            return;
        }// end function

        private function initEvent() : void
        {
            this.addEventListener(MouseEvent.MOUSE_DOWN, this.touchHandler);
            this.addEventListener(MouseEvent.ROLL_OVER, this.touchHandler);
            this.addEventListener(MouseEvent.ROLL_OUT, this.touchHandler);
            this.img_Task.addEventListener(MouseEvent.CLICK, this.taskHandler);
            this.shouqiBtn.addEventListener(MouseEvent.CLICK, this.showTaskList);
            return;
        }// end function

        protected function taskHandler(event:MouseEvent) : void
        {
            this._task_Panel.visible = true;
            return;
        }// end function

        public function startHDGCZ() : void
        {
            this.showType = 99;
            this.nowactive = 1;
            return;
        }// end function

        public function showActive(param1:Object) : void
        {
            this.showType = param1.index;
            this.nowactive = 2;
            return;
        }// end function

        public function stopHDGCZ() : void
        {
            this._task_Panel.visible = true;
            this.nowactive = 0;
            return;
        }// end function

        private function compareFunction(param1:Object, param2:Object) : int
        {
            if (int(param1.plus.low) < int(param2.plus.low))
            {
                return -1;
            }
            if (int(param1.plus.low) > int(param2.plus.low))
            {
                return 1;
            }
            if (int(param1.cfg.type) < 5 && int(param2.cfg.type) < 5)
            {
                if (param1.plus.iscan > param2.plus.iscan)
                {
                    return -1;
                }
                if (param1.plus.iscan < param2.plus.iscan)
                {
                    return 1;
                }
            }
            if (int(param1.cfg.type) > int(param2.cfg.type))
            {
                return 1;
            }
            if (int(param1.cfg.type) < int(param2.cfg.type))
            {
                return -1;
            }
            return 0;
        }// end function

        private function chapterHandler(event:MouseEvent) : void
        {
            var _loc_2:Point = null;
            if (event.type == MouseEvent.MOUSE_OUT)
            {
                ModelProxy.change("tips", "state", "close");
            }
            else if (event.type == MouseEvent.MOUSE_OVER)
            {
                _loc_2 = new Point(mouseX, mouseY);
                ModelProxy.change("tips", "taskc", {data:"", p:localToGlobal(_loc_2)});
            }
            return;
        }// end function

        private function touchHandler(event:MouseEvent) : void
        {
            if (event.type == MouseEvent.ROLL_OVER)
            {
                TweenMax.allTo([this._panel_Task, this._title_Task], 0.3, {alpha:1});
            }
            else if (event.type == MouseEvent.MOUSE_DOWN)
            {
            }
            else if (event.type == MouseEvent.ROLL_OUT)
            {
                TweenMax.allTo([this._panel_Task, this._title_Task], 0.3, {alpha:0});
            }
            return;
        }// end function

        private function mouseDown(event:MouseEvent) : void
        {
            return;
        }// end function

        public function initTask() : void
        {
            Server.instance.send(117, CMDTask.GetTask, null, 0, ConnectType.SYSTEM);
            return;
        }// end function

        private function showTaskList(event:MouseEvent) : void
        {
            if (this.shouqiBtn.skin == "png.common.btn_unshow")
            {
                ModelProxy.change("mainui", "showtask", false);
                ModelProxy.change("mainui", "shownewguide", true);
                this.shouqiBtn.skin = "png.common.btn_show";
            }
            else
            {
                ModelProxy.change("mainui", "showtask", true);
                ModelProxy.change("mainui", "shownewguide", false);
                this.shouqiBtn.skin = "png.common.btn_unshow";
            }
            UIVisibleManager.instance.Hiddern("taskview");
            return;
        }// end function

        public function init(param1:Object) : void
        {
            var _loc_3:int = 0;
            var _loc_4:Object = null;
            var _loc_5:int = 0;
            var _loc_12:Object = null;
            var _loc_14:Object = null;
            var _loc_15:Array = null;
            var _loc_16:String = null;
            var _loc_17:Array = null;
            var _loc_18:TaskTrackItem = null;
            var _loc_19:Object = null;
            var _loc_20:int = 0;
            var _loc_21:int = 0;
            var _loc_2:* = new Object();
            this.tlist = [];
            this.activetitem.update();
            DestroyUtil.removeChildren(this._listSprite, 1);
            var _loc_6:* = UserData.getUserData("level");
            this._data = param1;
            ModelProxy.change("dataflag", "guideflag", false);
            ModelProxy.change("data", "tasks", param1);
            UserData.setData(UserDataType.Task, param1);
            ModelProxy.change("zone", "updatetask", null);
            var _loc_7:Boolean = false;
            var _loc_8:* = UserData.getUserData();
            var _loc_9:* = UserData.getOnlineData();
            if (ItemUilt.checkUserLevelRein(59, 0))
            {
                if (_loc_9)
                {
                    _loc_3 = 2;
                    if (_loc_9.dayinstances)
                    {
                        _loc_3 = _loc_3 - int(_loc_9.dayinstances[16001]);
                    }
                    if (_loc_3 > 0)
                    {
                        _loc_4 = new Object();
                        _loc_4 = {cfg:new Object(), plus:new Object()};
                        _loc_4.cfg.type = 9;
                        _loc_4.cfg.taskgroupid = 99;
                        _loc_4.plus.tstype = 2;
                        _loc_4.cfg.name = "塔防副本";
                        _loc_4.cfg.fnpc = 124;
                        _loc_4.plus.iscan = 1;
                        _loc_4.plus.state = 1;
                        this.tlist.push(_loc_4);
                        this._npcArr[2] = 124;
                    }
                    else
                    {
                        this._npcArr[2] = 0;
                    }
                }
            }
            if (ItemUilt.checkUserLevelRein(60, 0))
            {
                if (_loc_9)
                {
                    _loc_3 = 0;
                    _loc_14 = ConfigDictionary.data.instance;
                    _loc_15 = [15005, 15006, 15008, 15009, 15010];
                    _loc_5 = 0;
                    while (_loc_5 < _loc_15.length)
                    {
                        
                        _loc_16 = _loc_14[_loc_15[_loc_5]].limit_times;
                        _loc_17 = _loc_16.split(" ");
                        _loc_3 = _loc_3 + int(_loc_17[1]);
                        _loc_5++;
                    }
                    if (_loc_9.dayinstances)
                    {
                        _loc_3 = _loc_3 - int(_loc_9.dayinstances[15005]) - int(_loc_9.dayinstances[15006]) - int(_loc_9.dayinstances[15008]) - int(_loc_9.dayinstances[15009]) - int(_loc_9.dayinstances[15010]);
                    }
                    if (_loc_3 > 0)
                    {
                        _loc_4 = new Object();
                        _loc_4 = {cfg:new Object(), plus:new Object()};
                        _loc_4.cfg.type = 8;
                        _loc_4.plus.iscan = 1;
                        _loc_4.cfg.taskgroupid = 99;
                        _loc_4.plus.tstype = 3;
                        _loc_4.cfg.name = "材料副本";
                        _loc_4.cfg.fnpc = 248;
                        _loc_4.plus.state = 1;
                        this.tlist.push(_loc_4);
                        this._npcArr[1] = 248;
                    }
                    else
                    {
                        this._npcArr[1] = 0;
                    }
                }
            }
            this.taskFlag = true;
            var _loc_10:Boolean = false;
            var _loc_11:Boolean = false;
            for each (_loc_12 in param1)
            {
                
                if (_loc_12 && _loc_12.hasOwnProperty("taskid"))
                {
                    if (_loc_12.state < 4)
                    {
                        _loc_2 = {cfg:this.mTasks[_loc_12.taskid], plus:new Object()};
                        if (!_loc_2)
                        {
                            continue;
                        }
                        if (_loc_12.rctask)
                        {
                            _loc_2.plus.rctask = _loc_12.rctask;
                        }
                        _loc_2.plus.state = _loc_12.state;
                        if (_loc_2.cfg.level > _loc_6)
                        {
                            _loc_2.plus.iscan = 0;
                        }
                        else
                        {
                            _loc_2.plus.iscan = 1;
                        }
                        if (_loc_2.cfg.type == 4)
                        {
                            _loc_3 = this.cfgTaskNum[_loc_2.cfg.taskgroupid].num - int(this._data["group_" + _loc_2.cfg.taskgroupid]);
                            if (_loc_3 < 1 && _loc_12.state == 1)
                            {
                                this._npcArr[0] = 0;
                                _loc_2.plus.low = 1;
                            }
                            else
                            {
                                if (_loc_12.state == 1)
                                {
                                    _loc_11 = true;
                                }
                                this._npcArr[0] = _loc_2.cfg.fnpc;
                                _loc_2.plus.low = 0;
                            }
                        }
                        if (_loc_2.cfg.type == 14)
                        {
                            _loc_3 = this.cfgTaskNum[_loc_2.cfg.taskgroupid].num - int(this._data["group_" + _loc_2.cfg.taskgroupid]);
                            if (_loc_3 < 1)
                            {
                                this._npcArr[3] = 0;
                            }
                            else
                            {
                                this._npcArr[3] = _loc_2.cfg.fnpc;
                            }
                        }
                        if (_loc_2.cfg.type == 1)
                        {
                            this.taskFlag = false;
                            if (_loc_2.plus.iscan == 0)
                            {
                                _loc_10 = true;
                            }
                        }
                        this.tlist.push(_loc_2);
                    }
                }
            }
            if (this._npcArr[0] > 0 && _loc_10 && _loc_11)
            {
                ModelProxy.change("zone", "haszhuxian", true);
            }
            else
            {
                ModelProxy.change("zone", "haszhuxian", false);
            }
            this.tlist.sort(this.compareFunction);
            var _loc_13:int = 0;
            this.itemArr = new Vector.<TaskTrackItem>;
            _loc_5 = 0;
            while (_loc_5 < this.tlist.length)
            {
                
                if (this.tlist[_loc_5].cfg.type == 2 && _loc_6 < this.tlist[_loc_5].cfg.level)
                {
                }
                else
                {
                    if (this.tlist[_loc_5].cfg.type == 5 || this.tlist[_loc_5].cfg.type == 6 || this.tlist[_loc_5].cfg.type == 7 || this.tlist[_loc_5].cfg.taskgroupid == 5)
                    {
                        _loc_3 = 0;
                        _loc_19 = UserData.getData(UserDataType.Task);
                        _loc_20 = this.tlist[_loc_5].cfg.taskgroupid;
                        _loc_21 = int(_loc_19["group_" + _loc_20]);
                        if (_loc_21 >= int(this.cfgTaskNum[_loc_20].num) && this.tlist[_loc_5].plus.state != 2 && this.tlist[_loc_5].plus.state != 3)
                        {
                            ;
                        }
                    }
                    if (this.tlist[_loc_5].cfg.type == 3)
                    {
                        _loc_18 = new TaskTrackItem(true);
                    }
                    else
                    {
                        _loc_18 = new TaskTrackItem();
                    }
                    _loc_18.data = this.tlist[_loc_5];
                    _loc_18.y = _loc_5 + 1;
                    this._listSprite.addChild(_loc_18);
                    this.itemArr.push(_loc_18);
                }
                _loc_5++;
            }
            this.addTxt();
            this._isFirst = false;
            this.addTaskActive();
            this.updateTask();
            ModelProxy.change("data", "isdomouse", false);
            return;
        }// end function

        private function addTxt() : void
        {
            var _loc_7:Object = null;
            var _loc_8:MyLabel = null;
            var _loc_9:int = 0;
            var _loc_10:Object = null;
            var _loc_11:int = 0;
            var _loc_12:int = 0;
            var _loc_13:int = 0;
            var _loc_1:* = UserData.getUserData();
            var _loc_2:* = _loc_1.level;
            var _loc_3:Boolean = false;
            var _loc_4:Boolean = false;
            DestroyUtil.removeChildren(this.box_txt);
            var _loc_5:int = 0;
            var _loc_6:int = 0;
            for each (_loc_7 in this.cfgtaskview)
            {
                
                if (_loc_7.lv <= _loc_2)
                {
                    if (_loc_7.id == 5)
                    {
                        if (++ModelProxy.getValue("data", "openday") > 3)
                        {
                            continue;
                        }
                        _loc_10 = UserData.getOnlineData();
                        if (_loc_10)
                        {
                            _loc_11 = _loc_10.lianzhitimes;
                            if (_loc_11 >= 5)
                            {
                                continue;
                            }
                        }
                    }
                    _loc_8 = new MyLabel();
                    if (_loc_7.id == 2)
                    {
                        if (this.taskFlag)
                        {
                            _loc_12 = 0;
                            _loc_13 = 0;
                            while (_loc_13 < 4)
                            {
                                
                                _loc_12 = this._npcArr[_loc_13];
                                if (_loc_12 > 0)
                                {
                                    break;
                                }
                                _loc_13++;
                            }
                            if (_loc_12 == 0 && this.isFirstFlag)
                            {
                                if (this.timeline3)
                                {
                                    this.timeline3.kill();
                                }
                                _loc_8.filters = [];
                                this.timeline3 = TweenMax.to(_loc_8, 1, {glowFilter:{color:16763904, alpha:1, blurX:6, blurY:6, strength:4}, repeat:int.MAX_VALUE, yoyo:true});
                                this.isFirstFlag = false;
                            }
                        }
                    }
                    _loc_8.isOver = true;
                    if (_loc_7.type == 1)
                    {
                        _loc_3 = true;
                        _loc_8.x = _loc_5 * 34;
                        _loc_5++;
                    }
                    else
                    {
                        _loc_4 = true;
                        _loc_8.y = 22;
                        _loc_8.x = _loc_6 * 34;
                        _loc_6++;
                    }
                    _loc_8.color = 234933074;
                    _loc_8.underline = true;
                    _loc_8.text = "<u><a href=\'event:" + _loc_7.event + "\'>" + _loc_7.name + "</a></u></font>";
                    _loc_8.addEventListener(TextEvent.LINK, this.linkHandler);
                    this.box_txt.addChild(_loc_8);
                }
            }
            if (_loc_3 || _loc_4)
            {
                if (_loc_3)
                {
                    this.lab_zb.visible = true;
                }
                else
                {
                    this.lab_zb.visible = false;
                }
                if (_loc_4)
                {
                    this.lab_sj.visible = true;
                }
                else
                {
                    this.lab_sj.visible = false;
                }
                this.box_view.x = 0;
                this.box_view.width = 260;
                this._listSprite.addChild(this.box_view);
            }
            return;
        }// end function

        private function linkHandler(event:TextEvent) : void
        {
            var _loc_2:Array = null;
            var _loc_3:String = null;
            var _loc_4:Object = null;
            var _loc_5:MyLabel = null;
            _loc_2 = event.text.split("#");
            switch(int(_loc_2[0]))
            {
                case 1:
                {
                    if (ItemUilt.checkMapIsFly())
                    {
                        _loc_4 = ConfigDictionary.data.sysnpc[_loc_2[1]];
                        ModelProxy.change("data", "taskfindpath", _loc_4.npcid);
                        ModelProxy.change("zone", "stopGuaji", null);
                        PluginManager.instance.sendToServer("taskdialog", CMDTaskdialog.Fly, {x:_loc_4.x, y:_loc_4.y, tostageid:_loc_4.stageid});
                    }
                    break;
                }
                case 2:
                {
                    _loc_3 = _loc_2[1];
                    if (_loc_3 == "bossChallenge")
                    {
                        _loc_5 = event.currentTarget as MyLabel;
                        if (this.timeline3)
                        {
                            this.timeline3.kill();
                        }
                        if (_loc_5)
                        {
                            _loc_5.filters = [];
                        }
                    }
                    PluginManager.instance.changePlugin(_loc_3, new Point(100, 100), 1, null);
                    break;
                }
                default:
                {
                    break;
                }
            }
            return;
        }// end function

        private function touchHandler1(event:MouseEvent) : void
        {
            var _loc_2:Object = null;
            var _loc_3:Point = null;
            if (event.type == MouseEvent.MOUSE_OVER)
            {
                if (this._lv == 10)
                {
                    _loc_2 = this.mitems[207110];
                }
                else if (this._lv == 20)
                {
                    _loc_2 = this.mitems[207111];
                }
                else if (this._lv == 30)
                {
                    _loc_2 = this.mitems[207112];
                }
                else
                {
                    _loc_2 = this.mitems[207113];
                }
                _loc_3 = new Point(mouseX, mouseY);
                ModelProxy.change("tips", "tool", {data:_loc_2, p:localToGlobal(_loc_3)});
            }
            else if (event.type == MouseEvent.MOUSE_OUT)
            {
                ModelProxy.change("tips", "state", "close");
            }
            return;
        }// end function

        public function doSome(param1:int) : void
        {
            var _loc_9:int = 0;
            var _loc_10:int = 0;
            var _loc_11:int = 0;
            var _loc_2:* = ConfigDictionary.data.task;
            var _loc_3:* = _loc_2[param1].tnpc;
            var _loc_4:* = this.cfgnpcs[_loc_3];
            if (this.cfgnpcs[_loc_3] == null)
            {
                return;
            }
            var _loc_5:* = UserData.getUserData();
            var _loc_6:* = UserData.getUserData("mapid");
            if (this.cfgmaps[_loc_6] && this.cfgmaps[_loc_6].cls == 6)
            {
                ModelProxy.change("data", "wzadpos", "");
                return;
            }
            if (_loc_2[param1].type == 4)
            {
                if (_loc_2[param1].level >= 70)
                {
                    ModelProxy.change("zone", "startGuaji", null);
                    return;
                }
            }
            if (_loc_2[param1].chuansong == 2)
            {
                _loc_9 = _loc_4.stageid;
                _loc_10 = _loc_4.x;
                _loc_11 = _loc_4.y;
                ModelProxy.change("zone", "stopGuaji", null);
                DialogMgr.instance.open(AppDialog.OPEN_Fly, [_loc_10, _loc_11, _loc_9, _loc_4.npcid]);
                return;
            }
            var _loc_7:* = UserData.getUserData("level");
            var _loc_8:* = UserData.getUserData("rein");
            if (int(_loc_2[param1].tnpc > 0))
            {
                if (int(_loc_2[param1].chuansong) != 2)
                {
                    ModelProxy.change("zone", "autoTaskMove", {x:_loc_4.x, y:_loc_4.y, tostageid:_loc_4.stageid, onhorse:true, npcid:_loc_4.npcid});
                }
                else
                {
                    ModelProxy.change("data", "taskfindpath", _loc_4.npcid);
                    ModelProxy.change("zone", "stopGuaji", null);
                }
            }
            else
            {
                ModelProxy.change("zone", "stopGuaji", null);
            }
            return;
        }// end function

        public function changeState(param1:Object) : void
        {
            var _loc_2:int = 0;
            while (_loc_2 < this.tlist.length)
            {
                
                if (this.tlist[_loc_2].taskid == param1[0])
                {
                    this.tlist[_loc_2].state = param1[1];
                }
            }
            return;
        }// end function

        public function updateRoleData() : void
        {
            var _loc_1:* = UserData.getData(UserDataType.Task);
            if (_loc_1 != null)
            {
                this.init(_loc_1);
            }
            var _loc_2:* = UserData.getOnlineData();
            if (this.tdItem)
            {
                this.tdItem.updateCount();
            }
            return;
        }// end function

        public function showSBKGC() : void
        {
            this._daySprite.y = this.taskSprite.height + 5;
            return;
        }// end function

        public function zhanlingSBK(param1:Object) : void
        {
            this._daySprite.y = this.taskSprite.height + 5;
            return;
        }// end function

        public function showActiveView(param1:Boolean) : void
        {
            return;
        }// end function

        public function hideSBKGC() : void
        {
            this._daySprite.y = this.taskSprite.height + 5;
            return;
        }// end function

        public function upDateFly() : void
        {
            var _loc_2:TaskTrackItem = null;
            var _loc_1:* = ModelProxy.getValue("data", "ringdata");
            if (_loc_1 && _loc_1[0] >= 7)
            {
                for each (_loc_2 in this.itemArr)
                {
                    
                    if (_loc_2.btn)
                    {
                        _loc_2.btn.visible = true;
                    }
                }
            }
            return;
        }// end function

        private function linkHandlerActive(event:MouseEvent) : void
        {
            var _loc_2:* = this._txtActive.localToGlobal(new Point(0, 0));
            ModelProxy.change("plugin", "change", {target:"active", point:_loc_2, top:new Point(100, 100)});
            return;
        }// end function

        private function linkHandler1(event:MouseEvent) : void
        {
            var _loc_2:* = this._txtDay3.localToGlobal(new Point(0, 0));
            ModelProxy.change("plugin", "change", {target:"instance", point:_loc_2});
            return;
        }// end function

        private function linkHandler4(event:MouseEvent) : void
        {
            var _loc_2:* = this._txtDay4.localToGlobal(new Point(0, 0));
            ModelProxy.change("plugin", "change", {target:"juezhan", point:_loc_2});
            return;
        }// end function

        private function linkHandler5(event:MouseEvent) : void
        {
            var _loc_2:* = this._txtDay5.localToGlobal(new Point(0, 0));
            ModelProxy.change("plugin", "change", {target:"tejieshipian", point:_loc_2});
            return;
        }// end function

        private function linkHandler3(event:MouseEvent) : void
        {
            var _loc_2:* = this._txtDay3.localToGlobal(new Point(0, 0));
            ModelProxy.change("plugin", "change", {target:"instance", point:_loc_2, data:5});
            return;
        }// end function

        private function linkHandler2(event:MouseEvent) : void
        {
            var _loc_2:* = this._txtDay4.localToGlobal(new Point(0, 0));
            ModelProxy.change("plugin", "open", {target:"npcdialog", point:_loc_2, top:new Point(int((GlobalLayer.instance.root.stageWidth - 700) / 2), 100), data:{npcid:168, type:"huodong"}});
            return;
        }// end function

        private function addTaskActive() : void
        {
            if (this.isAdd == true)
            {
                return;
            }
            this.isAdd = true;
            return;
        }// end function

        public function lvUpdate() : void
        {
            var _loc_2:TaskTrackItem = null;
            var _loc_5:int = 0;
            var _loc_6:Object = null;
            var _loc_9:int = 0;
            var _loc_10:Object = null;
            var _loc_12:Object = null;
            var _loc_13:Array = null;
            var _loc_14:String = null;
            var _loc_15:Array = null;
            var _loc_16:Object = null;
            var _loc_17:int = 0;
            var _loc_18:int = 0;
            var _loc_1:int = 0;
            if (this.tlist == null)
            {
                return;
            }
            var _loc_3:Boolean = false;
            var _loc_4:Boolean = false;
            var _loc_7:* = UserData.getUserData("level");
            var _loc_8:Array = [];
            for each (_loc_10 in this.tlist)
            {
                
                if (_loc_10.cfg.level && _loc_10.cfg.level > _loc_7)
                {
                    _loc_10.plus.iscan = 0;
                }
                else
                {
                    _loc_10.plus.iscan = 1;
                }
                if (_loc_10.cfg.taskgroupid == 99)
                {
                    _loc_8[_loc_10.plus.tstype] = 1;
                }
                if (_loc_10.cfg.type == 4)
                {
                    _loc_5 = this.cfgTaskNum[_loc_10.cfg.taskgroupid].num - int(this._data["group_" + _loc_10.cfg.taskgroupid]);
                    if (_loc_5 < 1 && int(_loc_10.plus.state) == 1)
                    {
                        this._npcArr[0] = 0;
                        _loc_10.plus.low = 1;
                    }
                    else
                    {
                        if (_loc_10.state == 1)
                        {
                            _loc_4 = true;
                        }
                        this._npcArr[0] = _loc_10.cfg.fnpc;
                        _loc_10.plus.low = 0;
                    }
                }
                if (_loc_10.cfg.type == 1)
                {
                    this.taskFlag = false;
                    if (_loc_10.plus.iscan == 0)
                    {
                        _loc_3 = true;
                    }
                }
            }
            if (this._npcArr[0] > 0 && _loc_3 && _loc_4)
            {
                ModelProxy.change("zone", "haszhuxian", true);
            }
            else
            {
                ModelProxy.change("zone", "haszhuxian", false);
            }
            var _loc_11:* = UserData.getOnlineData();
            if (ItemUilt.checkUserLevelRein(59, 0))
            {
                if (int(_loc_8[2]) != 1)
                {
                    if (_loc_11)
                    {
                        _loc_5 = 2;
                        if (_loc_11.dayinstances)
                        {
                            _loc_5 = 2 - int(_loc_11.dayinstances[16001]);
                        }
                        if (_loc_5 > 0)
                        {
                            _loc_6 = new Object();
                            _loc_6 = {cfg:new Object(), plus:new Object()};
                            _loc_6.cfg.type = 9;
                            _loc_6.cfg.taskgroupid = 99;
                            _loc_6.plus.tstype = 2;
                            _loc_6.cfg.name = "塔防副本";
                            _loc_6.cfg.fnpc = 124;
                            _loc_6.plus.iscan = 1;
                            _loc_6.plus.state = 1;
                            this.tlist.push(_loc_6);
                            _loc_2 = new TaskTrackItem();
                            _loc_2.data = _loc_6;
                            this._listSprite.addChild(_loc_2);
                            this.itemArr.push(_loc_2);
                        }
                    }
                }
            }
            if (ItemUilt.checkUserLevelRein(60, 0))
            {
                if (int(_loc_8[3]) != 1)
                {
                    if (_loc_11)
                    {
                        _loc_5 = 0;
                        _loc_12 = ConfigDictionary.data.instance;
                        _loc_13 = [15005, 15006, 15008, 15009, 15010];
                        _loc_9 = 0;
                        while (_loc_9 < _loc_13.length)
                        {
                            
                            _loc_14 = _loc_12[_loc_13[_loc_9]].limit_times;
                            _loc_15 = _loc_14.split(" ");
                            _loc_5 = _loc_5 + int(_loc_15[1]);
                            _loc_9++;
                        }
                        if (_loc_11.dayinstances)
                        {
                            _loc_5 = _loc_5 - int(_loc_11.dayinstances[15005]) - int(_loc_11.dayinstances[15006]) - int(_loc_11.dayinstances[15008]) - int(_loc_11.dayinstances[15009]) - int(_loc_11.dayinstances[15010]);
                        }
                        if (_loc_5 > 0)
                        {
                            _loc_6 = new Object();
                            _loc_6 = {cfg:new Object(), plus:new Object()};
                            _loc_6.cfg.type = 8;
                            _loc_6.plus.iscan = 1;
                            _loc_6.cfg.taskgroupid = 99;
                            _loc_6.plus.tstype = 3;
                            _loc_6.cfg.name = "材料副本";
                            _loc_6.cfg.fnpc = 248;
                            _loc_6.plus.state = 1;
                            this.tlist.push(_loc_6);
                            _loc_2 = new TaskTrackItem();
                            _loc_2.data = _loc_6;
                            this._listSprite.addChild(_loc_2);
                            this.itemArr.push(_loc_2);
                        }
                    }
                }
            }
            this.tlist.sort(this.compareFunction);
            _loc_9 = 0;
            while (_loc_9 < this.tlist.length)
            {
                
                if (this.tlist[_loc_9].cfg.type == 5 || this.tlist[_loc_9].cfg.type == 6 || this.tlist[_loc_9].cfg.type == 7 || this.tlist[_loc_9].cfg.taskgroupid == 5)
                {
                    _loc_5 = 0;
                    _loc_16 = UserData.getData(UserDataType.Task);
                    _loc_17 = this.tlist[_loc_9].cfg.taskgroupid;
                    _loc_18 = int(_loc_16["group_" + _loc_17]);
                    if (_loc_18 >= int(this.cfgTaskNum[_loc_17].num) && this.tlist[_loc_9].plus.state != 2 && this.tlist[_loc_9].plus.state != 3)
                    {
                        ;
                    }
                }
                if (this.itemArr.length > _loc_9)
                {
                    (this.itemArr[_loc_9] as TaskTrackItem).y = _loc_9 + 1;
                    (this.itemArr[_loc_9] as TaskTrackItem).data = this.tlist[_loc_9];
                }
                _loc_9++;
            }
            this.addTxt();
            this.updateTask();
            return;
        }// end function

        public function updateTask() : void
        {
            this._listSprite.changeHeight();
            var _loc_1:* = this._listSprite.height + 15;
            this.img_back.height = this._listSprite.height + 15;
            var _loc_1:* = _loc_1;
            this._panel_Task.height = _loc_1;
            this._task_Panel.height = _loc_1;
            return;
        }// end function

        public function updateGoal(param1:Array) : void
        {
            var _loc_6:Object = null;
            var _loc_7:TaskTrackItem = null;
            var _loc_2:* = param1[0];
            var _loc_3:* = param1[1];
            var _loc_4:* = UserData.getData(UserDataType.Task);
            if (UserData.getData(UserDataType.Task)["tid_" + param1[2]].state == 3)
            {
                return;
            }
            var _loc_5:* = _loc_4["tid_" + param1[2]].state;
            _loc_4["goal_" + _loc_2] = _loc_3;
            if (_loc_3[0] >= _loc_3[1])
            {
                _loc_4["tid_" + param1[2]].state = 3;
                _loc_6 = ConfigDictionary.data.task;
                if (int(_loc_6[param1[2]].chapterid) > 0)
                {
                    ModelProxy.change("mainui", "bigfont", [1000]);
                }
                if (int(_loc_6[param1[2]].autofinsh) > 0)
                {
                    PluginManager.instance.sendToServer("taskdialog", CMDTaskdialog.Submit, [param1[2], 1]);
                }
                this.init(_loc_4);
                return;
            }
            if (_loc_5 != 3)
            {
                for each (_loc_7 in this.itemArr)
                {
                    
                    if (_loc_7.mtaskid == param1[2])
                    {
                        _loc_7.data = _loc_7.data;
                        return;
                    }
                }
                this.init(_loc_4);
            }
            return;
        }// end function

        public function togoal(param1:int) : void
        {
            var _loc_6:int = 0;
            var _loc_7:Object = null;
            var _loc_12:String = null;
            var _loc_13:String = null;
            var _loc_14:Array = null;
            var _loc_15:Array = null;
            var _loc_16:int = 0;
            var _loc_17:Object = null;
            var _loc_18:Object = null;
            var _loc_19:Point = null;
            var _loc_20:Array = null;
            var _loc_2:* = UserData.getUserData("level");
            var _loc_3:* = ConfigDictionary.data.task;
            var _loc_4:* = _loc_3[param1].goals;
            var _loc_5:* = _loc_3[param1].goals[0];
            if (_loc_3[param1].goals[0].goaltype == 4 || _loc_5.goaltype == 5)
            {
                ModelProxy.change("data", "taskfindwoman", true);
            }
            else if (param1 == 107)
            {
                ModelProxy.change("zone", "stopGuaji", null);
                return;
            }
            var _loc_8:int = 0;
            var _loc_9:int = 0;
            var _loc_10:int = 0;
            if (_loc_3[param1].chuansong == 1)
            {
                _loc_6 = this.mTasks[param1].tnpc;
                _loc_7 = this.cfgnpcs[_loc_6];
                _loc_8 = _loc_7.x;
                _loc_9 = _loc_7.y;
                _loc_10 = _loc_7.stageid;
                PluginManager.instance.sendToServer("taskdialog", CMDTaskdialog.Fly, {x:_loc_8, y:_loc_9, tostageid:_loc_10});
                ModelProxy.change("zone", "stopGuaji", null);
            }
            else if (_loc_3[param1].chuansong == 2 || _loc_3[param1].chuansong == 3)
            {
                if (_loc_3[param1].taskgroupid == 4)
                {
                    _loc_12 = _loc_5.x;
                    _loc_13 = _loc_5.y;
                    _loc_14 = _loc_12.split(";");
                    _loc_15 = _loc_13.split(";");
                    _loc_16 = Math.random() * _loc_14.length;
                    _loc_8 = _loc_14[_loc_16];
                    _loc_9 = _loc_15[_loc_16];
                }
                else
                {
                    _loc_8 = _loc_5.x;
                    _loc_9 = _loc_5.y;
                }
                _loc_10 = _loc_5.stageid;
                ModelProxy.change("zone", "stopGuaji", null);
                DialogMgr.instance.open(AppDialog.OPEN_Fly, [_loc_8, _loc_9, _loc_10, 0]);
                return;
            }
            var _loc_11:* = UserData.getUserData("rein");
            if (_loc_5.goaltype == 3)
            {
                if (param1 == 107 || param1 == 149)
                {
                    return;
                }
                _loc_6 = this.mTasks[param1].tnpc;
                _loc_7 = this.cfgnpcs[_loc_6];
                _loc_8 = _loc_7.x;
                _loc_9 = _loc_7.y;
                _loc_10 = _loc_7.stageid;
                ModelProxy.change("data", "taskfindpath", _loc_7.npcid);
                ModelProxy.change("zone", "autoMove", {x:_loc_8, y:_loc_9, tostageid:_loc_10, onhorse:true});
            }
            else if (_loc_5.goaltype == 10 || _loc_5.goaltype == 13)
            {
                _loc_17 = UserData.getOnlineData("guide");
                _loc_18 = new Object();
                if (this.cfgtaskguide[4] && this.cfgtaskguide[4][param1])
                {
                    _loc_18 = this.cfgtaskguide[4][param1];
                    if (GuideView.getInstance().checkIsDo(_loc_18.id))
                    {
                        GuideView.getInstance().addGuide(_loc_18.id);
                        _loc_7 = this.cfgnpcs[int(_loc_18.eventparam)];
                        ModelProxy.change("data", "taskfindpath", _loc_7.npcid);
                        ModelProxy.change("zone", "stopGuaji", null);
                        ModelProxy.change("zone", "autoMove", {x:_loc_7.x, y:_loc_7.y, tostageid:_loc_7.stageid, onhorse:true});
                    }
                }
                return;
            }
            else if (_loc_3[param1].type == 4)
            {
                ModelProxy.change("task", "richang", true);
            }
            else
            {
                ModelProxy.change("zone", "stopGuaji", null);
                if (this._cfgIns == null)
                {
                    this._cfgIns = ConfigDictionary.data.instance;
                }
                if (this._cfgIns[_loc_5.stageid] && this._cfgIns[_loc_5.stageid].autofight == 0)
                {
                }
                else
                {
                    _loc_19 = new Point(_loc_5.x, _loc_5.y);
                    _loc_20 = [_loc_5.x, _loc_5.y, int(_loc_5.goalparam), _loc_5.stageid];
                    ModelProxy.change("data", "taskfindmaster", _loc_20);
                }
                ModelProxy.change("zone", "autoMove", {x:_loc_5.x, y:_loc_5.y, tostageid:_loc_5.stageid, onhorse:true});
            }
            return;
        }// end function

        public function findNpc() : void
        {
            var _loc_6:Object = null;
            var _loc_1:* = ModelProxy.getValue("data", "openday");
            if (_loc_1 > 0)
            {
                return;
            }
            var _loc_2:* = ModelProxy.getValue("data", "isdomouse");
            if (_loc_2 || !this.visible)
            {
                return;
            }
            var _loc_3:* = UserData.getUserData("mapid");
            if (_loc_3 != 1035)
            {
                return;
            }
            var _loc_4:int = 0;
            var _loc_5:int = 0;
            while (_loc_5 < 4)
            {
                
                _loc_4 = this._npcArr[_loc_5];
                if (_loc_4 > 0)
                {
                    _loc_6 = this.cfgnpcs[_loc_4];
                    ModelProxy.change("data", "taskfindpath", _loc_6.npcid);
                    ModelProxy.change("zone", "stopGuaji", null);
                    ModelProxy.change("zone", "autoMove", {x:_loc_6.x, y:_loc_6.y, tostageid:_loc_6.stageid, onhorse:true});
                    break;
                }
                _loc_5++;
            }
            return;
        }// end function

        public function checkDoTask() : void
        {
            var _loc_3:Object = null;
            var _loc_4:Array = null;
            var _loc_5:Object = null;
            var _loc_6:String = null;
            var _loc_7:String = null;
            var _loc_8:Array = null;
            var _loc_9:Array = null;
            var _loc_10:int = 0;
            var _loc_1:* = UserData.getData(UserDataType.Task);
            var _loc_2:* = UserData.getUserData("level");
            if (_loc_2 < 70 && !this.taskFlag)
            {
                if (this.mTasks == null)
                {
                    this.mTasks = ConfigDictionary.data.task;
                }
                for each (_loc_3 in _loc_1)
                {
                    
                    if (_loc_3 && _loc_3.hasOwnProperty("taskid"))
                    {
                        if (_loc_3.state == 2)
                        {
                            _loc_1 = {cfg:this.mTasks[_loc_3.taskid], plus:new Object()};
                            if (!_loc_1)
                            {
                                continue;
                            }
                            if (_loc_1.cfg.type == 4)
                            {
                                _loc_4 = _loc_1.cfg.goals;
                                _loc_5 = _loc_4[0];
                                _loc_6 = _loc_5.x;
                                _loc_7 = _loc_5.y;
                                _loc_8 = _loc_6.split(";");
                                _loc_9 = _loc_7.split(";");
                                _loc_10 = Math.random() * _loc_8.length;
                                this.taskArr[0] = _loc_8[_loc_10];
                                this.taskArr[1] = _loc_9[_loc_10];
                                this.taskArr[2] = null;
                                this.taskArr[3] = _loc_5.stageid;
                                if (this.timeoutID1)
                                {
                                    clearTimeout(this.timeoutID1);
                                    this.timeoutID1 = 0;
                                }
                                this.timeoutID1 = setTimeout(this.doTask, 15000);
                            }
                            continue;
                        }
                        if (_loc_3.state == 3)
                        {
                            _loc_1 = {cfg:this.mTasks[_loc_3.taskid], plus:new Object()};
                            if (!_loc_1)
                            {
                                continue;
                            }
                            if (_loc_1.cfg.type == 4)
                            {
                                this.taskNpc = _loc_1.cfg.tnpc;
                                if (this.timeoutID1)
                                {
                                    clearTimeout(this.timeoutID1);
                                    this.timeoutID1 = 0;
                                }
                                this.timeoutID1 = setTimeout(this.doTask1, 15000);
                            }
                        }
                    }
                }
            }
            return;
        }// end function

        private function doTask1() : void
        {
            var _loc_2:Object = null;
            var _loc_1:* = ModelProxy.getValue("data", "isdomouse");
            if (_loc_1)
            {
                return;
            }
            if (this.taskNpc > 0)
            {
                _loc_2 = this.cfgnpcs[this.taskNpc];
                ModelProxy.change("data", "taskfindpath", _loc_2.npcid);
                ModelProxy.change("zone", "stopGuaji", null);
                ModelProxy.change("zone", "autoMove", {x:_loc_2.x, y:_loc_2.y, tostageid:_loc_2.stageid, onhorse:true});
            }
            return;
        }// end function

        private function doTask() : void
        {
            var _loc_1:* = ModelProxy.getValue("data", "isdomouse");
            if (_loc_1)
            {
                return;
            }
            ModelProxy.change("data", "taskfindmaster", this.taskArr);
            ModelProxy.change("zone", "stopGuaji", null);
            ModelProxy.change("zone", "autoMove", {x:this.taskArr[0], y:this.taskArr[1], tostageid:this.taskArr[3], onhorse:true});
            return;
        }// end function

        public function findStarNpc() : void
        {
            var _loc_2:Object = null;
            var _loc_1:* = this._npcArr[0];
            if (_loc_1 > 0)
            {
                _loc_2 = this.cfgnpcs[_loc_1];
                ModelProxy.change("data", "taskfindpath", _loc_2.npcid);
                ModelProxy.change("zone", "stopGuaji", null);
                ModelProxy.change("zone", "autoMove", {x:_loc_2.x, y:_loc_2.y, tostageid:_loc_2.stageid, onhorse:true});
            }
            return;
        }// end function

    }
}
